//
//  TTCache.h
//  Tint
//
//  Created by Kevin Wu on 2/23/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TTCore.h"
#import "TTAdditions.h"
#import "TTBasic.h"


@interface TTCache : NSObject {
    NSString *_cacheType;
    NSTimeInterval _defaultTimeoutInterval;
}

@property(nonatomic, readonly) NSString *cacheType;
@property(nonatomic, assign) NSTimeInterval defaultTimeoutInterval; // Default: 7 days

- (id)initWithType:(NSString *)type;

+ (id)sharedObject;
+ (id)cacheByType:(NSString *)type;

- (void)clearCache;
- (void)cleanUp;
- (void)removeCacheForKey:(NSString *)key;
- (BOOL)hasCacheForKey:(NSString *)key;
- (NSArray *)cacheKeys;
- (NSUInteger)count;

@end
